package cn.net.yato.picture.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName LoginLog
 * @Description 登录日志
 * @Author yato
 * @Date 2020/2/17 13:18
 * @Version 1.0
 */
@Data
@TableName(value = "loginlog")
public class LoginLog implements Serializable {
    /**
     * 自增id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private long id;
    /**
     * 用户id 唯一
     */
    @TableField(value = "user_id")
    private String userId;
    /**
     * 登录渠道 唯一
     */
    @TableField(value = "loginType")
    private String loginType;
    /**
     * 登录地址
     */
    @TableField(value = "login_address")
    private String loginAddress;
    /**
     * 公网ip地址
     */
    @TableField(value = "ip")
    private String ip;
    /**
     * 登录日期
     */
    @TableField(value = "loginDate")
    private Date loginDate;

    public LoginLog() {
    }

    public LoginLog(long id, String userId, String loginType, String loginAddress, String ip, Date loginDate, String isLogin) {
        this.id = id;
        this.userId = userId;
        this.loginType = loginType;
        this.loginAddress = loginAddress;
        this.ip = ip;
        this.loginDate = loginDate;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getLoginAddress() {
        return loginAddress;
    }

    public void setLoginAddress(String loginAddress) {
        this.loginAddress = loginAddress;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Date getLoginDate() {
        return loginDate;
    }

    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }

    public String getLoginType() {
        return loginType;
    }

    public void setLoginType(String loginType) {
        this.loginType = loginType;
    }

}
